<template>
  <div>
    <div>
      other page {{ $t("message.hello") }} --- {{ $t("sf_title") }}---{{
        $t("sf_head")
      }}
    </div>
    <button @click="changeLange">语言切换</button>
  </div>
</template>

<script>
import {getUserList} from "@/serve/index"
export default {
  data() {
    return {};
  },
  methods: {
    changeLange() {
      console.log("process.meta.env =>",process.env.NODE_ENV);
      
      getUserList()
      let locale = this.$i18n.locale;
      if (locale == "zh") {
        this.$i18n.locale = "en";
      }

      if (locale == "en") {
        this.$i18n.locale = "zh";
      }
      localStorage.setItem('lange',this.$i18n.locale)
      console.log(this.$t("sf_title"));
      
    },
  },
};
</script>

<style scoped></style>
